package cn.itcast.user.service;

import cn.itcast.entity.User;
import cn.itcast.user.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;

	@Override
	public User findById(Long id) {
		return userDao.findById(id).get();
	}

	@Override
	public List findAll() {
		return userDao.findAll();
	}
}
